home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 December / macformat-044.iso / Demos / The Ghost Cave / BB / AHOME.Dxr / 00001.ls next >
Encoding:
Text File  |  1996-06-14  |  1.7 KB  |  80 lines

  1. global entry, help2, clicker, sound, firsttimeout, ticType
  2.  
  3. on startMovie
  4.   stoptimeout()
  5.   set the mouseUpScript to EMPTY
  6.   set clicker to [the number of cast "story", the number of cast "comprehension", the number of cast "projector", the number of cast "painting", the number of cast "puzzle", the number of cast "door"]
  7.   if the machineType < 256 then
  8.     set ticType to 25
  9.   else
  10.     set ticType to 24
  11.   end if
  12.   cursor([40, 41])
  13.   updateStage()
  14.   cursor([40, 41])
  15.   updateStage()
  16.   puppetPalette("home")
  17.   if entry = 1 then
  18.     set firsttimeout to 1
  19.     preLoadCast(1, 276)
  20.     go("1ST")
  21.   else
  22.     if entry = 2 then
  23.       set firsttimeout to 0
  24.       preLoadCast(1, 135)
  25.       puppetSound("Wom06.AIF")
  26.       go("no lips")
  27.     else
  28.       set firsttimeout to 0
  29.       preLoadCast(1, 135)
  30.       preLoadCast(280, 324)
  31.       go("4TH")
  32.     end if
  33.   end if
  34.   cursor([38, 39])
  35.   updateStage()
  36.   cursor([38, 39])
  37.   updateStage()
  38.   puppetPalette(0)
  39.   set help2 to 0
  40. end
  41.  
  42. on stopMovie
  43.   puppetSprite(sound, 0)
  44.   set clicker to []
  45.   set the keyDownScript to EMPTY
  46. end
  47.  
  48. on settimeout
  49.   set the timeoutKeyDown to 0
  50.   if not firsttimeout then
  51.     set the timeoutLength to 15 * 60
  52.   else
  53.     set the timeoutLength to 3 * 60
  54.   end if
  55.   set the timeoutLapsed to 0
  56.   set the timeoutMouse to 1
  57.   set the timeoutScript to "playergo"
  58. end
  59.  
  60. on stoptimeout
  61.   set the timeoutKeyDown to 0
  62.   set the timeoutLength to 60 * 60
  63.   set the timeoutLapsed to 0
  64.   set the timeoutMouse to 1
  65.   set the timeoutScript to EMPTY
  66. end
  67.  
  68. on playergo
  69.   if not firsttimeout then
  70.     puppetSound("Wom04.AIF")
  71.     updateStage()
  72.   else
  73.     puppetSound("Wom14.AIF")
  74.     updateStage()
  75.     set firsttimeout to 0
  76.     set the timeoutLength to 15 * 60
  77.     set the timeoutLapsed to 0
  78.   end if
  79. end
  80.